<%--
  Created by IntelliJ IDEA.
  User: LJS
  Date: 2018/11/14
  Time: 23:37
  To change this template use File | Settings | File Templates.
--%>
<%@ page language="java" contentType="text/html;charset=UTF-8" pageEncoding="UTF-8" %>
<%@ page trimDirectiveWhitespaces="true"%>
<%@page isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName()
            + ":" + request.getServerPort() + path + "/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
    <title>公文培训管理</title>
    <jsp:include page="resource.jsp"/>
</head>
<body>
<jsp:include page="common.jsp"/>

<!-- Start #content -->
<div id="content">
    <!-- Start .content-wrapper -->
    <div class="content-wrapper">
        <!-- Start .row -->
        <div class="row">
            <!-- Start .page-header -->
            <div class="col-lg-12 heading">
                <h1 class="page-header"><i class="im-file3"></i> 公文培训管理</h1>
            </div>
            <!-- End .page-header -->
        </div>
        <!-- End .row -->
        <!-- Start .outlet -->
        <div class="outlet">
            <!-- Page start here ( usual with .row ) -->
            <div class="row printable">
                <!-- col-lg-12 start here -->
                <div class="col-lg-12">
                    <!-- Start .panel -->
                    <div class="panel panel-default plain">
                        <div class="panel-heading white-bg"></div>
                        <div class="panel-body">
                            <!-- Start .invoice -->
                            <div class="invoice">
                                <!-- auth -->
                                <!-- <a href="=basePath.train/person/list.do" class="mb5">返回</a> -->
                                <a href="<%=basePath%>train/all/list.do" class="mb5">返回</a>
                                <a href="javacript:void(0);" class="pull-right mb5" onclick="editable()"><i class="ec-pencil"></i> 修改</a>
                                <form class="form-horizontal" id="invoice-form" action="<%=basePath%>train/update.do" method="post">
                                    <input type="hidden" id="staffTrainId" name="staffTrainId" value="${staffTrain.staffTrainId}"/>
                                    <table class="table table-bordered">
                                        <tr>
                                            <td width="15%">
                                                <label for="staffNo" class="control-label">员工工号</label>
                                            </td>
                                            <td width="35%">
                                                <input type="text" class="form-control limitInput" maxlength="20"
                                                       value="${staffTrain.staffNo}" id="staffNo" name="staffNo" readonly="readonly">
                                            </td>
                                            <td width="15%">
                                                <label for="staffName" class="control-label">员工姓名</label>
                                            </td>
                                            <td width="35%">
                                                <input type="text" class="form-control limitInput" maxlength="20"
                                                       value="${staffTrain.staffName}" id="staffName" name="staffName" disabled="disabled">
                                            </td>
                                        </tr>
                                        <tr>
                                            <td width="15%">
                                                <label for="staffTrainStartDate" class="control-label">开始日期</label>
                                            </td>
                                            <td width="35%">
                                                <div class="input-group">
                                                    <input class="form-control datetime-picker2" type="text"
                                                           value="<fmt:formatDate value="${staffTrain.staffTrainStartDate}" pattern="yyyy-MM-dd"/>"
                                                           id="staffTrainStartDate" name="staffTrainStartDate" disabled="disabled">
                                                    <span class="input-group-addon"><i class="im-calendar"></i></span>
                                                </div>
                                            </td>
                                            <td width="15%">
                                                <label for="staffTrainEndDate" class="control-label">结束日期</label>
                                            </td>
                                            <td width="35%">
                                                <div class="input-group">
                                                    <input class="form-control datetime-picker2" type="text"
                                                           value="<fmt:formatDate value='${staffTrain.staffTrainEndDate}' pattern='yyyy-MM-dd'/>"
                                                           id="staffTrainEndDate" name="staffTrainEndDate" disabled="disabled">
                                                    <span class="input-group-addon"><i class="im-calendar"></i></span>
                                                </div>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td width="15%">
                                                <label for="staffTrainApplyResult" class="control-label">申请结果</label>
                                            </td>
                                            <td width="35%">
                                                <select class="form-control" id="staffTrainApplyResult" name="staffTrainApplyResult"
                                                        disabled="disabled">
                                                    <option value="">--请选择--</option>
                                                    <c:forEach items="${applyResultList}" var="apply">
                                                        <c:if test="${apply.dictId eq staffTrain.staffTrainApplyResult}">
                                                            <option value="${apply.dictId}" selected>${apply.dictItemName}</option>
                                                        </c:if>
                                                        <c:if test="${apply.dictId ne staffTrain.staffTrainApplyResult}">
                                                            <option value="${apply.dictId}">${apply.dictItemName}</option>
                                                        </c:if>
                                                    </c:forEach>
                                                </select>
                                            </td>
                                            <td width="15%">
                                                <label for="staffTrainResult" class="control-label">培训结果</label>
                                            </td>
                                            <td width="35%">
                                                <select class="form-control" id="staffTrainResult" name="staffTrainResult" disabled="disabled">
                                                    <option value="">--请选择--</option>
                                                    <c:forEach items="${trainResultList}" var="train">
                                                        <c:if test="${train.dictId eq staffTrain.staffTrainResult}">
                                                            <option value="${train.dictId}" selected>${train.dictItemName}</option>
                                                        </c:if>
                                                        <c:if test="${train.dictId ne staffTrain.staffTrainResult}">
                                                            <option value="${train.dictId}">${train.dictItemName}</option>
                                                        </c:if>
                                                    </c:forEach>
                                                </select>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td><label for="staffTrainUnit" class="control-label">培训单位</label></td>
                                            <td colspan="3">
                                                <input type="text" class="form-control limitInput" maxlength="20"
                                                       value="${staffTrain.staffTrainUnit}" id="staffTrainUnit" name="staffTrainUnit" disabled="disabled">
                                            </td>
                                        </tr>
                                        <tr>
                                            <td><label for="staffTrainContent" class="control-label">培训内容</label></td>
                                            <td colspan="3">
                                                <textarea class="form-control limitTextarea" maxlength="150" rows="2"
                                                          id="staffTrainContent" name="staffTrainContent" disabled="disabled">${staffTrain.staffTrainContent}</textarea>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td><label for="staffTrainApplyReason" class="control-label">申请理由</label></td>
                                            <td colspan="3">
                                                <textarea class="form-control limitTextarea" maxlength="150" rows="2"
                                                          id="staffTrainApplyReason" name="staffTrainApplyReason" disabled="disabled">${staffTrain.staffTrainApplyReason}</textarea>
                                            </td>
                                        </tr>
                                    </table>
                                    <div class="form-group">
                                        <input type="submit" class="btn btn-primary col-md-3 col-md-offset-4" value="保存" />
                                    </div>
                                </form>
                            </div>
                            <!-- End .invoice -->
                        </div>
                    </div>
                    <!-- End .panel -->
                </div>
                <!-- col-lg-12 end here -->
            </div>
            <!-- Page End here -->
        </div>
        <!-- End .outlet -->
    </div>
    <!-- End .content-wrapper -->
    <div class="clearfix"></div>
</div>
<!-- End #content -->
</body>
</html>
